#ifndef __ROTARY_H__
#define __ROTARY_H__
#include "stdint.h"

typedef enum{
   Close=0,
   Open=1,
}Phase_Ctrl_State;

typedef enum{
  Positive_Rotrary=1,
  Negetive_Rotrary=2,
}Rotrary_Direction;

typedef enum{
  continuous=1,/*连续旋转*/
  dispersed=2,/*分段旋转*/
}Rotrary_Mode;

typedef enum{
  disable=0,/*失能*/
  enable=1,/*使能*/
}En_Gate_Status;

extern void Set_CurrentSector(uint8_t val);
extern uint8_t Get_CurrentSector(void);
extern void rotary(uint8_t CurrentSector,uint8_t dir);
extern void Set_CurrentDir(uint8_t val);
extern uint8_t Get_CurrentDir(void);
extern void Set_CurrentMode(uint8_t val);
extern uint8_t Get_CurrentMode(void);
extern void Bldc_Init(void);
extern void Set_ENGate_Status(En_Gate_Status states);
extern En_Gate_Status Get_ENGate_Status(void);
extern void Toggle_Engate(void);
extern void Set_Speed_Rpm(uint16_t speed);
extern uint16_t Get_Speed_Rpm(void);
#endif

